<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('finalTest')} > ${i18n.getMessage('list')}">
	<a href="#" onclick="pp('study/showReportFinalTest.sgt?offeringId=${offering.id}')">${i18n.getMessage('report')}</a>
	
	<!-- - <a href="#" onclick="pp('study/showOldReportFinalTest.sgt?offeringId=${offering.id}')">Old Report</a> -->
	<!-- - <a href="#" onclick="pp('study/showOldScoreReportFinalTest.sgt?offeringId=${offering.id}')">Old Score Report</a> -->
	<!-- - <a href="#" onclick="pp('study/showOldCertificate.sgt?offeringId=${offering.id}')">Old Certificate</a> -->
	
	- <a href="#" onclick="cc('study/showListSecondTest.sgt?offeringId=${offering.id}')">${i18n.getMessage('secondFinalTest')}</a>
	- <a href="#" onclick="cc('study/showTestResult.sgt?offeringId=${offering.id}')">${i18n.getMessage('result')}</a>
	- <a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${offering.id}')">${i18n.getMessage('offering')}</a>
</@showTitle>

<br/>

<div id="error" style="display:none"></div>

<form action="study/editFinalTest.sgt" validator="study/validateFinalTest.sgt" onsubmit="submitFormValidation(this); return false;" onreset="$('error').hide()">
	<input type="hidden" name="offeringId" value="${offering.id}"/>
	<@display.table id="listTable" name="offeringMembers">
		<@display.column title="${i18n.getMessage('ordinalNumber')}" style="text-align:center">${listTable_rowNum}</@display.column>
		<@display.column title="${i18n.getMessage('lastName')}"><span <#if (!listTable.active)>style="text-decoration: line-through"</#if>>${(listTable.receipt.student.lastName)!}</span></@display.column>
		<@display.column title="${i18n.getMessage('firstName')}">
			<input <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> type="hidden" name="ids" value="${listTable.finalTest.id}"/><span <#if (!listTable.active)>style="text-decoration: line-through"</#if>>${(listTable.receipt.student.firstName)!}</span>
		</@display.column>
		<@display.column title="${i18n.getMessage('dateOfBirth')}" style="text-align:center">${(listTable.receipt.student.dateOfBirth?date)!}</@display.column>
		
		<@showWhenChildren offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.listening)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('readingAndWriting')}" style="text-align:center"><input name="readings" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.reading)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('speaking')}" style="text-align:center"><input name="speakings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.speaking)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('comment')}" style="text-align:center"><input name="comments" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.comment)!}" style="text-align:center;width:60px" onfocus="displayPopup('pages/study/newsletter.htm', this); return false"/></@display.column>
			<@display.column title="${i18n.getMessage('written')}" style="text-align:center">${(listTable.finalTest.writtenScore)!}</@display.column>
			<@display.column title="${i18n.getMessage('oral')}" style="text-align:center">${(listTable.finalTest.oralScore)!}</@display.column>
		</@showWhenChildren>
		
		<@showWhenTeenager offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.listening)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('grammar')}" style="text-align:center"><input name="grammars" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.grammar)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('reading')}" style="text-align:center"><input name="readings" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.reading)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('writing')}" style="text-align:center"><input name="writings" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.writing)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('speaking')}" style="text-align:center"><input name="speakings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.speaking)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('comment')}" style="text-align:center"><input name="comments" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.comment)!}" style="text-align:center;width:60px" onfocus="displayPopup('pages/study/newsletter.htm', this); return false"/></@display.column>
			<@display.column title="${i18n.getMessage('written')}" style="text-align:center">${(listTable.finalTest.writtenScore)!}</@display.column>
			<@display.column title="${i18n.getMessage('oral')}" style="text-align:center">${(listTable.finalTest.oralScore)!}</@display.column>			
		</@showWhenTeenager>
		
		<@showWhenGE offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.listening)!}" style="text-align:center;width:45px"/></@display.column>
			<@display.column title="${i18n.getMessage('pronun')}" style="text-align:center"><input name="pronunciations" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.pronunciation)!}" style="text-align:center;width:45px"/></@display.column>
			<@display.column title="${i18n.getMessage('grammar')}" style="text-align:center"><input name="grammars" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.grammar)!}" style="text-align:center;width:45px"/></@display.column>
			<@display.column title="${i18n.getMessage('reading')}" style="text-align:center"><input name="readings" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.reading)!}" style="text-align:center;width:45px"/></@display.column>
			<@display.column title="${i18n.getMessage('writing')}" style="text-align:center"><input name="writings" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.writing)!}" style="text-align:center;width:45px"/></@display.column>
			<@display.column title="${i18n.getMessage('speaking')}" style="text-align:center"><input name="speakings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.speaking)!}" style="text-align:center;width:45px"/></@display.column>
			<@display.column title="${i18n.getMessage('comment')}" style="text-align:center"><input name="comments" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.comment)!}" style="text-align:center;width:50px" onfocus="displayPopup('pages/study/newsletter.htm', this); return false"/></@display.column>
			<@display.column title="${i18n.getMessage('written')}" style="text-align:center">${(listTable.finalTest.writtenScore)!}</@display.column>
			<@display.column title="${i18n.getMessage('oral')}" style="text-align:center">${(listTable.finalTest.oralScore)!}</@display.column>
		</@showWhenGE>
		<@showWhenOther offering>
			<@display.column title="${i18n.getMessage('listening')}" style="text-align:center"><input name="listenings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.listening)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('grammar')}" style="text-align:center"><input name="grammars" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.grammar)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('reading')}" style="text-align:center"><input name="readings" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.reading)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('writing')}" style="text-align:center"><input name="writings" <#if (listTable.finalTest.makeUp)!false> disabled="disabled" </#if> value="${(listTable.finalTest.writing)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('speaking')}" style="text-align:center"><input name="speakings" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.speaking)!}" style="text-align:center;width:50px"/></@display.column>
			<@display.column title="${i18n.getMessage('comment')}" style="text-align:center"><input name="comments" <#if (listTable.finalTest.makeUp!false)> disabled="disabled" </#if> value="${(listTable.finalTest.comment)!}" style="text-align:center;width:60px" onfocus="displayPopup('pages/study/newsletter.htm', this); return false"/></@display.column>
			<@display.column title="${i18n.getMessage('written')}" style="text-align:center">${(listTable.finalTest.writtenScore)!}</@display.column>
			<@display.column title="${i18n.getMessage('oral')}" style="text-align:center">${(listTable.finalTest.oralScore)!}</@display.column>
		</@showWhenOther>
	</@display.table>
	
	<div style="text-align:center">
		<br/>
		<input type="submit" value="${i18n.getMessage('edit')}" class="button_style"/>
		<input type="reset" value="${i18n.getMessage('reset')}" class="button_style"/>
	</div>

</form>

<br/>